<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>标题</title> 
<link href="./css/ionic.css" rel="stylesheet"> 
<script src="./js/ionic.bundle.min.js"></script>
</head>
<body ng-app="myApp" ng-controller="actionsheetCtl" >
	<button class="button button-assertive" ng-click="show()">点我查看</button>
	<h2>{{message}}</h2> 
</body>
<script type="text/javascript">
var myApp = angular.module("myApp",["ionic"]);
myApp.run(function($ionicPlatform){
	$ionicPlatform.ready(function(){
		if(window.cordova && window.cordova.plugins.Keyboard) {
			cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
		}
		if(window.StatusBar) {
			StatusBar.styleDefault();
		}
	});
});
myApp.controller('actionsheetCtl',['$scope','$ionicActionSheet','$timeout',function($scope,$ionicActionSheet,$timeout){
	$scope.message = null;
	$scope.show = function() {
		var hideSheet = $ionicActionSheet.show({
		buttons: [
			{text:'<b>第</b> 一个'},
			{text:'第二个'},
			{text:'第三个'}
		],
		destructiveText: '删除',
		titleText: '请选择',
		cancelText: '取消',
		cancel: function(){
			$scope.message = "你点击了取消！";
			return true;
		},
		destructiveButtonClicked:function(){
			$scope.message = "你点击了删除！";
			return true;
		},
		buttonClicked: function(index){
			console.log(index);
			$scope.message = "你点击了第"+(index+1)+"个";
			return true;
		}
		});
		$timeout(function() {
			hideSheet();
		}, 200000);
	};  
}])
</script>
</html>
